package com.neusoft.resturant.service.impl;

import com.neusoft.resturant.entity.OrderDetail;
import com.neusoft.resturant.mapper.OrderDetailMapper;
import com.neusoft.resturant.service.IOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDetailServiceImpl implements IOrderDetailService {
    @Autowired
    private OrderDetailMapper orderDetailMapper;

    @Override
    public List<OrderDetail> selectAll(Integer oid) {
        return orderDetailMapper.selectAll(oid);
    }

    @Override
    public Integer insertOrderDetail(OrderDetail orderDetail) {
        return orderDetailMapper.insertOrderDetail(orderDetail);
    }

    @Override
    public Integer deleteOrderDetail(Integer oid) {
        return orderDetailMapper.delByOrderId(oid);
    }
}
